Attribute VB_Name = "MainMod"
'***************************************************************
' (c) Copyright 2000 Matthew J. Curland
'
' This file is from the CD-ROM accompanying the book:
' Advanced Visual Basic 6: Power Techniques for Everyday Programs
'   Author: Matthew Curland
'   Published by: Addison-Wesley, July 2000
'   ISBN: 0-201-70712-8
'   http://www.PowerVB.com
'***************************************************************
Option Explicit
Declare Function SetTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Declare Function KillTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long) As Long
Public g_Clocks As Collection

Sub TimerProc(ByVal hWnd As Long, ByVal uMsg As Long, ByVal idEvent As Long, ByVal dwTime As Long)
Dim Clock As Clock
Dim pClock As Long
    pClock = g_Clocks(CStr(idEvent))
    If pClock Then
        VBoost.AssignAddRef Clock, pClock
        Clock.Tick
    End If
End Sub
Sub Main()
    InitVBoost
    Set g_Clocks = New Collection
    If App.StartMode = vbSModeStandalone Then
        frmROTClock.Show
    End If
End Sub
